<ion-header>
  <ion-navbar color="orange">
    <ion-title>
      退还保证金到余额
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <div class="mt-box">
    <div class="ht-100 ht-border-bottom">
      <div class="ht-100 ht-line-50 ht-font-14 ht-333">退还金额</div>
      <div class="ht-100 ht-overflow flex">
        <span class="ht-font-30 ht-blod ht-000">￥</span>
        <input type="number" class="mt-input" placeholder="0.00" [(ngModel)]="postData.withdraw_money" [style.color]="postData.withdraw_money > frozen_money ? 'red':'black'">
      </div>
    </div>
    <div class="ht-100 ht-overflow ht-line-40 ht-font-14 ht-999">
      <span *ngIf="!(postData.withdraw_money > frozen_money) && postData.withdraw_money >= 0">
        保证金金额：￥{{frozen_money}}
      </span>
      <span class="text-red" *ngIf="postData.withdraw_money > frozen_money">
        返还金额不能大于当前保证金金额
      </span>
      <span class="text-red" *ngIf="postData.withdraw_money < 0">
        返还金额最少为0.01元
      </span>
    </div>
    <button ion-button [full]="true" color="orange" class="mt-btn" (click)="doRefund()" [disabled]="postData.withdraw_money <= 0 || postData.withdraw_money > frozen_money">退还</button>
  </div>
</ion-content>
